package com.cheng.example.geektime.designpatterns.j22.v2;


//public class Document {
//    private Html html;
//    private String url;
//
//    public Document(String url) {
//        this.url = url;
//        HtmlDownloader downloader = new HtmlDownloader();
//        this.html = downloader.downloadHtml(url);
//    }
//    //...
//}



public class Document {
    private Html html;
    private String url;

    public Document(String url, Html html) {
        this.html = html;
        this.url = url;
    }
    //...
}

